package com.ruoyi.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysHomeNavigationMapper;
import com.ruoyi.system.domain.SysHomeNavigation;
import com.ruoyi.system.service.ISysHomeNavigationService;
import com.ruoyi.common.core.text.Convert;

/**
 * 系统首页导航Service业务层处理
 *
 * @author ruoyi
 * @date 2020-07-15
 */
@Service
public class SysHomeNavigationServiceImpl implements ISysHomeNavigationService {
    @Autowired
    private SysHomeNavigationMapper sysHomeNavigationMapper;

    /**
     * 查询系统首页导航
     *
     * @param id 系统首页导航ID
     * @return 系统首页导航
     */
    @Override
    public SysHomeNavigation selectSysHomeNavigationById(Long id) {
        return sysHomeNavigationMapper.selectSysHomeNavigationById(id);
    }

    /**
     * 查询系统首页导航列表
     *
     * @param sysHomeNavigation 系统首页导航
     * @return 系统首页导航
     */
    @Override
    public List<SysHomeNavigation> selectSysHomeNavigationList(SysHomeNavigation sysHomeNavigation) {
        return sysHomeNavigationMapper.selectSysHomeNavigationList(sysHomeNavigation);
    }

    /**
     * 新增系统首页导航
     *
     * @param sysHomeNavigation 系统首页导航
     * @return 结果
     */
    @Override
    public int insertSysHomeNavigation(SysHomeNavigation sysHomeNavigation) {
        return sysHomeNavigationMapper.insertSysHomeNavigation(sysHomeNavigation);
    }

    /**
     * 修改系统首页导航
     *
     * @param sysHomeNavigation 系统首页导航
     * @return 结果
     */
    @Override
    public int updateSysHomeNavigation(SysHomeNavigation sysHomeNavigation) {
        return sysHomeNavigationMapper.updateSysHomeNavigation(sysHomeNavigation);
    }

    /**
     * 删除系统首页导航对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysHomeNavigationByIds(String ids) {
        return sysHomeNavigationMapper.deleteSysHomeNavigationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除系统首页导航信息
     *
     * @param id 系统首页导航ID
     * @return 结果
     */
    @Override
    public int deleteSysHomeNavigationById(Long id) {
        return sysHomeNavigationMapper.deleteSysHomeNavigationById(id);
    }
}
